<template>
  <PageMain :before-back="titleBeforeBack">
    <template #header> </template>
    <template #body>
      <div class="bg-white h-full p-[20px] flex flex-col">
        <div class="grow">
          <a-row class="row">
            <a-col span="8">
              <SubjectDetailItem label="主体名称" :value="data.name" />
            </a-col>
            <a-col span="8">
              <SubjectDetailItem label="类型" :value="data.type" />
            </a-col>
            <a-col span="8"> </a-col>
          </a-row>
          <a-row class="row">
            <a-col span="8">
              <SubjectDetailItem label="统一社会信用代码" :value="data.credit_code" />
            </a-col>
            <a-col span="8">
              <SubjectDetailItem label="联系人" :value="data.contact_user_name" />
            </a-col>
            <a-col span="8">
              <SubjectDetailItem label="联系电话" :value="data.contact_user_phone" />
            </a-col>
          </a-row>
          <a-row class="row">
            <a-col span="8">
              <SubjectDetailItem label="联系地址" :value="data.contact_address" />
            </a-col>
            <a-col span="8"> </a-col>
            <a-col span="8"> </a-col>
          </a-row>
          <a-row class="row">
            <a-col span="8">
              <SubjectDetailItem label="注册地址" :value="data.registered_address" />
            </a-col>
            <a-col span="8"> </a-col>
            <a-col span="8"> </a-col>
          </a-row>
        </div>
        <div class="h-[40px] flex justify-end">
          <a-button type="primary" @click="handleConfirmEvent">确定</a-button>
        </div>
      </div>
    </template>
  </PageMain>
</template>

<script setup>
import SubjectDetailItem from './components/SubjectDetailItem.vue';
import PageMain from '@/components/PageBox.vue';
import { useRouter } from 'vue-router';

const router = useRouter();
const data = {
  name: '上海有方事业集团',
  type: '总公司',
  credit_code: '23047203942038XXS',
  contact_user_name: '王守仁',
  contact_user_phone: '18900112233',
  contact_address: '上海测试区',
  registered_address: '上海测试区',
  icon_urls: ['b9e32c4d-6e14-446d-8827-05b77979e8db|企业图标.png']
};

// handleConfirmEvent
const handleConfirmEvent = () => {
  console.log('handleConfirmEvent');
  router.push({ name: 'subject' });
};
</script>
